package cpr.data;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

import cpr.Rule;

public class AR {
	public Rule rule;
	public Map entriesMap;
	public List entriesList;
	public int stat;
	public String toString() {
        StringBuffer sb = new StringBuffer();
        for (Iterator iter = entriesList.iterator(); iter.hasNext();) {
            AREntry are = (AREntry)iter.next();
            sb.append(are.toString()+"\n");
        }
     return sb.toString();   
    
    }
    /*
	public void removeHeadAndTail() {
		List are_head = new ArrayList();
		AREntry plus_max = null;
		String plus_max_key = null;
		for (Iterator iter = entriesMap.keySet().iterator(); iter.hasNext();) {
			String key = (String) iter.next();
			AREntry are = (AREntry)entriesMap.get(key);
			if (are.minus.size()==0) {
				are_head.add(key);
				if ((plus_max==null)||(plus_max.plus.size()< are.plus.size())) {
					plus_max = are;
					plus_max_key = key;
				}
			}
		}
		for (Iterator iter = are_head.iterator(); iter.hasNext();) {
			String key = (String) iter.next();
			if (!plus_max_key.equals(key)) {
				entriesMap.remove(key);
			}
		}
		
	}
    */
}